import { PORT1 } from '@/api/config/servicePort';
// import { ResPage, User } from '@/api/interface/index';
import http from '@/api';
import { Header, DicDeptRlst } from '@/api/interface/index';
// 字典接口
export const getDicList = (headers?: Header, params?: any) => {
	return http.post<any[]>(`${PORT1}web/public/dicList`, {}, { params, headers });
};

// 机构
export const orgList = (orgMajorType?: string, orgType?: string) => {
	return http.post<any[]>(`${PORT1}web/public/orglist`, { orgMajorType, orgType }, {});
};

// 科室字典
export const deptDicList = (params?: any) => {
	return http.get<DicDeptRlst[]>(`${PORT1}sys/dic/dept`, {}, { params });
};

export const downloadFileError = (params: { keyId: string }) => {
	return http.get<BlobPart>(`${PORT1}web/knowledge/cfgcatalogicd9/errorMap/${params.keyId}`, {}, { responseType: 'blob' });
};

export const downloadFile = (params: { keyId: string }) => {
	return http.get<BlobPart>(`${PORT1}web/public/download/${params.keyId}`, {}, { responseType: 'blob' });
};

// 医保区划树状
export const admdvsList = () => {
	return http.post<any[]>(`${PORT1}web/public/admdvs`, {}, {});
};

// 地方目录树状
export const placemedlist = (admdvs?: string) => {
	return http.get<any[]>(`${PORT1}bas/placemedlist/tree`, { admdvs }, {});
};

// 系统参数
export const paraList = () => {
	return http.post<any>(`${PORT1}web/public/paraList`, {}, {});
};
